package org.zty.db;

public class POJOAttr {
	private String name;
	private String firstBigName;
	private Type type;
	private int length;
	private boolean isPK = false;
	
	
	public boolean isPK() {
		return isPK;
	}
	public void setPK(boolean isPK) {
		this.isPK = isPK;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
		this.firstBigName = name.substring(0, 1).toUpperCase() + name.substring(1);
	}
	public Type getType() {
		return type;
	}
	public void setType(Type type) {
		this.type = type;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public String getFirstBigName() {
		return firstBigName;
	}
	public void setFirstBigName(String firstBigName) {
		this.firstBigName = firstBigName;
	}
	
	public static enum Type{
		LONG("long"),INT("int"),STRING("string"),DATE("date");
		
		Type(String name){
			this.name = name;
		}
		String name;
		@Override
		public String toString() {
			return name.toString();
		}
	}
	
}
